package com.proj.mhl.service;

import com.proj.mhl.dao.EmployeeDAO;
import com.proj.mhl.domain.Employee;

/*
* 完成对Employee表的操作
* 调用DAO
* */
public class EmployeeService {
    //定义DAO
    private EmployeeDAO employeeDAO= new EmployeeDAO();

    //根据id pwd 校验
    public Employee getEmployeeByIdANDPwd(String empId,String pwd){
        Employee employee =
                employeeDAO.querySingle("select * from employee where empId = ? and pwd = md5(?)", Employee.class, empId, pwd);
        return employee;
    }

}
